package com.example.threadtest

import android.app.IntentService
import android.content.Intent
import android.content.Context
import android.util.Log


/**
 * An [IntentService] subclass for handling asynchronous task requests in
 * a service on a separate handler thread.

 * TODO: Customize class - update intent actions, extra parameters and static
 * helper methods.

 */
class MyIntentService : IntentService("MyIntentService") {
    private  val TAG = "MyIntentService"

    override fun onHandleIntent(intent: Intent?) {
        Log.d(TAG, "onHandleIntent: 当前线程id:+${Thread.currentThread().id}")
    }

    /**
     * Handle action Foo in the provided background thread with the provided
     * parameters.
     */
    override fun onDestroy() {
        super.onDestroy()
        Log.d(TAG, "onDestroy: MyIntentService destroyed")
    }


}